package com.qianfeng.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qianfeng.entity.dto.AdminModule;
import com.qianfeng.entity.vo.JqueryTreeView;
import com.qianfeng.mapper.AdminModuleMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class AdminModuleService extends ServiceImpl<AdminModuleMapper , AdminModule> {

    @Transactional(readOnly = true)
    public List<JqueryTreeView> getModuleByAdminId(Long adminId){
        return this.baseMapper.getModuleByAdminId(adminId);
    }

    @Transactional(readOnly = true)
    public List<AdminModule> getByAdminId(Long adminId) {
        return this.baseMapper.getByAdminId(adminId);
    }
}
